/*
 * system_timer.h
 *
 *  Created on: Mar 4, 2012
 *
 *	Initialized on program startup, Threaded
 *	Running always (like keyboard), and Generates Interrupts at some Constant Rate.
 *
 */

#ifndef SYSTEM_TIMER_H_
#define SYSTEM_TIMER_H_

#include "../CPU/cpu.h"

typedef struct {
	int interval_length;
	interrupt intr;
	cpu* my_st_cpu;

} system_timer;
/*
 * Sets up the timer, Must include a reference to the CPU in order to send Interrupts.
 *
 */
//semaphore_t*
void system_timer_init(system_timer* the_st, int interval_length, cpu* proc);

void system_timer_run(system_timer* the_st);

#endif /* SYSTEM_TIMER_H_ */
